package com.gm.beans;

import com.gm.entities.SubirExamenRemarque;
import com.gm.controllers.SubirExamenRemarqueFacade;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.inject.Inject;
import javax.enterprise.context.SessionScoped;

@Named(value = "subirExamenRemarqueController")
@SessionScoped
public class SubirExamenRemarqueController extends AbstractController<SubirExamenRemarque> implements Serializable {

    @Inject
    private SubirExamenRemarqueFacade ejbFacade;

    public SubirExamenRemarqueController() {
        super(SubirExamenRemarque.class);
    }

    @PostConstruct
    public void init() {
        super.setFacade(ejbFacade);
    }

    @Override
    protected void setEmbeddableKeys() {
        this.getSelected().getSubirExamenRemarquePK().setIdExamen(this.getSelected().getExamen().getIdExamen());
        this.getSelected().getSubirExamenRemarquePK().setIdPersonne(this.getSelected().getPersonne().getIdPersonne());
        this.getSelected().getSubirExamenRemarquePK().setIdRemarque(this.getSelected().getRemarque().getIdRemarque());
    }

    @Override
    protected void initializeEmbeddableKey() {
        this.getSelected().setSubirExamenRemarquePK(new com.gm.entities.SubirExamenRemarquePK());
    }
}
